import request from '@/utils/request'

export function findAll(data) {
  return request({
    url: '/attendanceRecords/findAll',
    method: 'get',
    params: data
  })
}


export function getAttendanceStats() {
  return request({
    url: '/attendanceRecords/getAttendanceStats',
    method: 'get'
  })
}

export function checkIn(data) {
  return request({
    url: '/attendanceRecords/checkIn',
    method: 'post',
    data
  })
}


export function checkOut(data) {
  return request({
    url: '/attendanceRecords/checkOut',
    method: 'post',
    data
  })
}

export function deleteOne(id) {
  return request({
    url: '/user/delete',
    method: 'get',
    params:{id}
  })
}
//批量删除
export function batchdelete(ids) {
  return request({
    url: '/user/delete/batch',
    method: 'get',
    params: {ids:ids.join(',')}
  })
}
//添加
export function addUser(data) {

  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}
//修改
export function updateUser(data) {

  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}

